#pragma once
#include "PF_List.h"
#include "RoomManager.h"
#include"RoomStateManager.h"
#include<memory>
class RoomBase  {
protected:
    int roomID; // room ID
    int matchCount; // number of matches in the room
    int curRound; //current round number

    int operatingTeamID; // ID of the team that is currently operating in the room
    vector<int> teamIDs; // IDs of the teams in the room
    RoomStateManager*stateManager; // state manager for the room


public:
    RoomBase(int id) : roomID(id) {
        stateManager = new RoomStateManager();
    }

    virtual ~RoomBase() {}

    int getRoomID() const { return roomID; }

    int getMatchCount() const { return matchCount; }
    int getCurRound() const { return curRound; }
    vector<int> getTeamsID()const {return teamIDs;}
    int getOperatingTeamID() const { return operatingTeamID; }

    void setOperatingTeamID(int teamID) { operatingTeamID = teamID; }
    void setTeamIDs(vector<int> teamIDs) { this->teamIDs = teamIDs; }
    void setCurRound(int curRound) { this->curRound = curRound; }
    void setMatchCount(int matchCount) { this->matchCount = matchCount; }

    
    virtual void BroadcastMessage(const string& message) const {
    }


    virtual RoomStateManager* getStateManager() const {
        return stateManager;
    }


    virtual int getPFList(int matchIndex,PF_List& pfList) = 0;

    virtual vector<PF_List> getPFLists()=0;

    
    virtual int AddTeam(int teamID)=0;
        
    virtual int RemoveTeam(int teamID)=0;

};